home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / audio / somePlayback / README < prev    next >
Encoding:
Text File  |  1994-08-02  |  2.7 KB  |  67 lines

  1.  
  2.                  toolbox/src/exampleCode/audio/somePlayback
  3.  
  4.  
  5.                            Good stereo listening. 
  6.  
  7.  
  8.  
  9.        someWaves.c implements functionality to generate several
  10.        oscillators and waveforms.  It can also change playback rate,
  11.        mix, change pitch, loop audio samples and send them to the 
  12.        output speaker(s).
  13.  
  14.  
  15.  
  16.        This code generates 16 oscillator sound with pulse-width 
  17.        modulation on an Indigo--8 in the left ear and 8 in the right 
  18.        ear.  It can change the playback rate of the audio sample with 
  19.        an algorithm that least impacts the CPU just adding and/or 
  20.        dropping samples.  Also included is conscise code for 
  21.        demonstrating looping (specify loop points and it will loop 
  22.        between those either forward or backward.)  
  23.        
  24.        PLEASE NOTE THERE IS A GREAT DEAL OF DOCUMENTATION IN someWaves.c
  25.  
  26.        It appears the Indigo can do at least 21 oscillators (waveform 
  27.        of any size) with variable pitch and 26 with fixed pitch.  All 
  28.        at 44100 samples/sec.  The lower the output sampling rate, the 
  29.        more oscillators you get.
  30.  
  31.        One can vary the time duration the given program runs for (default
  32.        is 10 seconds) as well as indicate a specific output filename:
  33.             Usage:          -help
  34.                             -time (seconds > 0) default: 10
  35.                             <output file name>
  36.  
  37.  
  38.        The Makefile included builds five different executables:
  39.  
  40.  
  41.     someSawtoothWaves               stereo sawtooth waves:  every harmonic
  42.                                     present with an amplitude 1/harmonic#.
  43.                                     Compile with -DSAWTOOTH_WAVE only.
  44.  
  45.     someSquareWaves                 stereo sawtooth waves: odd harmonics
  46.                                     present with amplitude 1/harmonic#.
  47.                                     Square wave is a pulse wave with a
  48.                                     50% duty cycle.
  49.                                     Compile with -DSQUARE_WAVE only.
  50.  
  51.     somePulseWaves                  stereo sawtooth waves:  pulse wave 
  52.                                     with a short duty cycle.
  53.                                     Compile with -DPULSE_WAVE only.
  54.  
  55.     somePulseWidthModulatedWaves    stereo sawtooth waves:  pulse waves 
  56.                                     with a modulated duty cycle.
  57.                                     Compile with -DPULSE_WAVE 
  58.                                             and  -DPULSE_WIDTH_MODULATION.
  59.  
  60.     someCoolWaves                   stereo waves:  every fifth harmonic
  61.                                     present with an amplitude 1/harmonic#.
  62.                                     Compile with -DCOOL_WAVE only.
  63.  
  64.  
  65.                 Compiling with no flags yields no sound.
  66.  
  67.